﻿/*///////////////////////////////////////////////////////////
TodoEvent.as
Ben Smith
2009
///////////////////////////////////////////////////////////*/

package com.bsmith.app.model 
{
	import flash.events.Event;
	
	/*===========================================================
	TodoEvent
	Events sent by todo app
	===========================================================*/
	public class TodoEvent extends Event
	{
		static public const NEW_TODO_ENTRY:String = "newtodoentry";
		static public const BAD_TODO_ENTRY:String = "badtodoentry";
		static public const REMOVE_TODO_ENTRY:String = "removetodoentry";
		static public const COMPLETED_TODO_ENTRY:String = "completedtodoentry";
		static public const REORDER_TODO_ENTRIES:String = "reordertodoentries";
		
		private var _data:Object = { };	//Custom data
		
		/*-----------------------------------------------------------
		TodoEvent - ctor
		-----------------------------------------------------------*/
		public function TodoEvent(type:String, data:Object=null, bubbles:Boolean = false, cancelable:Boolean = false) 
		{
			_data = data;
			super(type, bubbles, cancelable);
		}
		
		/*###########################################################
		GETTERS AND SETTERS
		###########################################################*/
		public function get data():Object { return _data; }
		public function set data(value:Object):void 
		{
			_data = value;
		}
	}
}